'''
Created on 05/04/2010

@author: User
'''
from google.appengine.ext import db 

    
#known users database
class KnownUser(db.Model): 
    kuser = db.UserProperty() 
    isNew = db.BooleanProperty()
    
class Playlist(db.Model):
    name = db.StringProperty()
    user = db.UserProperty()
    isDefault = db.BooleanProperty()
    
class Song(db.Model):
    id = db.StringProperty() #youtube video_id
    title = db.StringProperty()
    name = db.StringProperty()
    artist = db.StringProperty()
    duration = db.IntegerProperty()
    time = db.StringProperty()
    album = db.StringProperty()
    genre = db.StringProperty()
    path = db.StringProperty()
    infoStatus = db.StringProperty() #'0' for none '1' for name '2' for artist+name '3' for artist+name+album 
    genreStatus = db.StringProperty() #'0' for has '1' for hasnt
    #isValid = db.BooleanProperty()
    
class SongVSplaylist(db.Model):
    song_id = db.StringProperty()
    playlist_id = db.StringProperty()
    #position = db.IntegerProperty()
    
class FriendSuggestions (db.Model):
    receiver = db.StringProperty()
    sender = db.StringProperty()
    date = db.DateProperty(auto_now=True)
    is_read = db.BooleanProperty()
    song_id = db.StringProperty()
    
class Properties (db.Model):
    user = db.StringProperty()
    recieveEmails = db.BooleanProperty()
    findAlternatives = db.BooleanProperty()

class StoredToken(db.Model):
    user_email = db.StringProperty(required=True)
    session_token = db.StringProperty(required=True)

class DTO(object):
    pass
